import Cookies from 'js-cookie'

const TokenKey = 'cookies'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}


// 永久存储
export function setLocalStorage(TokenKey,token) {
  return localStorage.setItem(TokenKey, token)
}
export function getLocalStorage(TokenKey) {
  return localStorage.getItem(TokenKey)
}

export function removeLocalStorage(TokenKey) {
  return localStorage.removeItem(TokenKey)
}
